﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ILeave
    {
        [OperationContract]
        int Leave_Using(int LeaveID);
        [OperationContract]
        DataSet Leave_GetAll();

        [OperationContract]
        LeaveInfo Leave_GetInfo(int LeaveID);

        [OperationContract]
        DataSet Leave_GetByBranchCode(string _BranchCode);

        [OperationContract]
        DataSet Leave_GetList(out int ItemCount, int currentPage, int pageSize, string _BranchCode);

        [OperationContract]
        int Leave_Insert(LeaveInfo eInfo);

        [OperationContract]
        bool Leave_Update(LeaveInfo eInfo);

        [OperationContract]
        bool Leave_Delete(int LeaveID);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class LeaveInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        string _Code;
        [DataMember]
        public string Code
        {
            get { return _Code; }
            set { _Code = value; }
        }
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        bool _Status;
        [DataMember]
        public bool Status
        {
            get { return _Status; }
            set { _Status = value; }
        }

        int _DateNumber;
        [DataMember]
        public int DateNumber
        {
            get { return _DateNumber; }
            set { _DateNumber = value; }
        }

        decimal _SalaryFactory;
        [DataMember]
        public decimal SalaryFactory
        {
            get { return _SalaryFactory; }
            set { _SalaryFactory = value; }
        }

        bool _SocialInsurance;
        [DataMember]
        public bool SocialInsurance
        {
            get { return _SocialInsurance; }
            set { _SocialInsurance = value; }
        }

        bool _MedicalInsurance;
        [DataMember]
        public bool MedicalInsurance
        {
            get { return _MedicalInsurance; }
            set { _MedicalInsurance = value; }
        }
        string _BranchCode;
        [DataMember]
        public string BranchCode
        {
            get { return _BranchCode; }
            set { _BranchCode = value; }
        }
    }
}
